package cn.cmcc.online.smsapi.ui.widget;

import android.content.Context;
import android.graphics.Color;
import android.view.Gravity;
import android.widget.LinearLayout;
import android.widget.TextView;

import cn.cmcc.online.smsapi.ui.util.DensityUtil;

/**
 * Created by ZhangYifan on 2017/6/19.
 */

public class DotTextView extends LinearLayout {
    private final TextView tvTtile;

    public DotTextView(Context context) {
        super(context);
        setGravity(Gravity.CENTER_VERTICAL);
        addView(new CustomDotView(context), DensityUtil.dp2px(context, 4), DensityUtil.dp2px(context, 4));
        tvTtile = new TextView(context);
        tvTtile.setTextColor(Color.parseColor("#999999"));
        tvTtile.setTextSize(12);
        LayoutParams tvTtileParams = new LayoutParams(-1, -2);
        tvTtileParams.setMargins(DensityUtil.dp2px(context, 5), 0, 0, 0);
        addView(tvTtile, tvTtileParams);
    }

    public void setTitle(String title) {
        tvTtile.setText(title);
    }
}
